import * as rule from '@/utils/rule'
export const modalConfig = {
     title: '用户管理',
     formItems: [
          {
               field: 'username',
               type: 'input',
               label: '用户名称',
               placeHolder: '请输入用户名称',
               disabled: false,
               rules: [rule.cannotBeEmpty('请输入用户名称')],
               visible: true,
               initValue: '',
          },
          {
               field: 'password',
               type: 'input',
               label: '用户密码',
               placeHolder: '请输入用户密码',
               disabled: false,
               rules: [
                    rule.cannotBeEmpty('请输入用户密码'),
                    rule.limitContinuousSymbol(6),
                    rule.limitContinuousLettersOrNumbers(6),
                    rule.limitLengthInterval(10, 30),
                    rule.limitPasswordFormat,
               ],
               visible: true,
               initValue: '',
          },

          {
               field: 'depinfo',
               type: 'select',
               label: '职位信息 ',
               placeHolder: '请输入职位信息',
               disabled: false,
               rules: [rule.cannotBeEmpty('请输入职位信息')],
               options: [
                    {
                         label: '地方总段长',
                         value: '地方总段长',
                    },
                    {
                         label: '地方段长',
                         value: '地方段长',
                    },
                    {
                         label: '联席办总召集人',
                         value: '联席办总召集人',
                    },
                    {
                         label: '联席办召集人',
                         value: '联席办召集人',
                    },
                    {
                         label: '其它',
                         value: '其它',
                    },
               ],
               visible: true,
               initValue: '',
          },

          {
               field: 'tel',
               type: 'input',
               label: '电话',
               placeHolder: '请输入电话',
               disabled: false,
               rules: [rule.cannotBeEmpty('请输入电话'), rule.limitNumber, rule.cellphone],
               visible: true,
               initValue: '',
          },
          {
               field: 'district',
               type: 'cascader',
               label: '行政区',
               placeHolder: '请输入行政区',
               disabled: false,
               rules: [rule.cannotBeEmpty('请输入行政区')],
               props: {
                    checkStrictly: true,
                    label: 'Name',
                    value: 'Name',
                    children: 'SubDistricts',
               },
               visible: true,
               cascader: [],
               initValue: '',
          },
          {
               field: 'permission',
               type: 'selectdx',
               label: '用户权限 ',
               placeHolder: '请选择用户权限',
               disabled: false,
               rules: [],
               options: [
                    {
                         label: '隐患管理',
                         value: '隐患管理',
                    },
                    {
                         label: '用户管理',
                         value: '用户管理',
                    },
               ],
               visible: true,
               initValue: '',
          },
          {
               field: 'xlqx',
               type: 'selectdx',
               label: '线路权限 ',
               placeHolder: '请选择线路权限',
               disabled: false,
               rules: [rule.cannotBeEmpty('请选择线路权限')],
               options: [],
               visible: true,
               initValue: '',
          },
     ],
     labelWidth: 'auto',
     colLayout: { span: 24 },
     itemStyle: { padding: 0 },
}
